package com.example.administrator.etrip;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;
//
public class DbOpenHelper extends SQLiteOpenHelper {
    //创建数据库，数据库的名字，版本
    public DbOpenHelper(Context context) {
        super(context, "information.db", null, 2);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        Log.d("输出：","dasfaddddddddddddddddddddd");
        //创建表格里面的字段
        db.execSQL("create table information (_id integer primary key autoincrement,place,number,price)");
        Log.d("输出：","da灌灌灌灌灌过过过ddd");
        db.execSQL("create table hometrip (_id integer primary key autoincrement,place,decription,price)");

    }
      //当版本更新时自动调用
    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
